package itbour.onetouchshow.activity.version1_3;

import android.os.Bundle;
import android.view.View;

import org.greenrobot.eventbus.EventBus;

import itbour.onetouchshow.activity.searchlist.SearchListFragment;
import itbour.onetouchshow.activity.searchlist.SearchListPresenter;

/**
 * Created by Administrator on 2018/2/28.
 */

public class SearchListActivity extends itbour.onetouchshow.activity.searchlist.SearchListActivity {


    @Override
    protected void afterCreate(Bundle savedInstanceState) {

        if (mPresenter == null) {
            mPresenter = new SearchListPresenter(this);
        }
        // registerExitReceiver();
        Bundle extras = getIntent().getExtras();
        if (extras != null) {
            keywork = extras.getString("keywork");
        }
        tvSearchTag.setText(keywork);
        searchListFragment = new SearchListFragment();
        addFragment(searchListFragment);
        id_hedad1.setVisibility(View.GONE);
        id_hedad2.setVisibility(View.GONE);
        ivSearchBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
                searchListFragment = null;
            }
        });

        rlCircularShape.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        backImage.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                EventBus.getDefault().post("exit");
                finish();
                searchListFragment = null;
            }
        });
    }


}
